package edu.depaul.se.courseregistration.jpa.user;
import java.io.Serializable;
import javax.persistence.*;

@NamedQueries({
    @NamedQuery(name= Student.STUDENT_QUERY_ALL, query="select s from Student s"),   
    @NamedQuery(name = Student.STUDENT_QUERY_BY_MAJOR, query = "SELECT s FROM Student s WHERE s.major = :" 
                        + Student.PERSON_MAJOR_PARAMETER_NAME),   
})

@Entity
public class Student extends Person implements Serializable {
        private static final long serialVersionUID = 1L;
        public static final String STUDENT_QUERY_ALL = "Student.findAll";
        public static final String STUDENT_QUERY_BY_MAJOR = "Student.findByMajor";
        
        public static final String PERSON_MAJOR_PARAMETER_NAME = "major";
        
        public Student(){};
        
        @Column(name = "MAJOR")
        private String major;
        //private StudentSchedule schedule;

        public String getMajor() {
            return major;
        }

        public void setMajor(String major) {
            this.major = major;
        }  
}
